﻿<%@ Page Title="" Language="C#" MasterPageFile="~/sqlshare_master.Master" AutoEventWireup="true" CodeBehind="table_manager.aspx.cs" Inherits="WebQueryRole.table_manager" %>
<%@ Register Assembly="Westwind.Web" Namespace="Westwind.Web.Controls" TagPrefix="ww" %>
<%@ Register assembly="System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" namespace="System.Web.UI.HtmlControls" tagprefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <title>Sql Share: Table Manager</title>    
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="main" runat="server">
<div class="sql_result" id="divErrors" runat="server" />
    <h3 id="divCurUser" style="float: right; margin: 0px;" runat="server" />
    <!-- LEFT CONTENT -->
    <form id="serverForm" method="get" runat="server">
        <table style="width 100%; vertical-align:top; text-align: left">
        <tr>
            <td class="td_left">
                
                    <h3>Tables</h3>
                    <asp:ListBox runat="server" ID="tableSelectList" onClick="clickLoadTable()" style="width:100%; height: 300px"></asp:ListBox>
                
            </td>
            <td class="td_right">
            <fieldset style="padding: 6px; ">
                <legend style="color: #833">Table Editor</legend>
                    <h2 id="tablename_h" style="font-size: 10pt; font-family: Arial"></h2>
                    Public <input type="checkbox" id="table_ispublic" /> | 
                    <input id="save_table_button" class="button" type="button" value="save" onclick="clickSaveTable()" /> | 
                    <input id="delete_table_button" class="button" type="button" value="delete" onclick="clickDeleteTable()" />
                    <textarea style="width: 98%;" id="tableTextBox" rows="9"></textarea>
                </fieldset>
            </td>
        </tr>     
        </table>  
    </form>
    
    <!-- BOTTOM CONTENT (sql output, errors) -->
    <div id="content_bottom" />
        
    <!-- INITIALIZE SCRIPTS // NOT PART OF GUI -->
    <ww:AjaxMethodCallback ID="Proxy" ServerUrl="AJAXCallbackHandler.aspx" runat="server" Timeout="4000" />
    <ww:ScriptContainer runat="server" ID="Scripts">
        <Scripts>            
            <script src="~/scripts/jquery.js" Resource="jquery"></script>
            <script src="~/scripts/ww.jQuery.js" Resource="ww.jquery"></script>
            <script src="scripts/table_manager.js"></script>
            <script src="scripts/ajaxcallbacks.js"></script>
        </Scripts>
    </ww:ScriptContainer>
</asp:Content>
